#ifndef SDL_H
#define SDL_H

#include "graphic.h"
#include <iostream>

#ifdef __APPLE__
    #include <SDL/SDL.h>
#else
    #include <SDL.h>
#endif

#define DEBUG
#undef DEBUG
#define MAX_SURFACES 1024

namespace shipEngine
{
    class sdl : public graphic
    {
        public:
            sdl();
            //graphic
            void setResolution(int x, int y, bool windowed);
            int openImage(std::string name);
            void destroyImage(int id);
            void drawImage(int id, int x, int y);
            void drawSprite(int id, sprite& param);
            void clearScreen();
            void flip();
            int getXres();
            int getYres();
            ~sdl();
        protected:
        private:
            int lastsurfid;
            int xres, yres;
            SDL_Surface *screen;
            SDL_Surface *images[MAX_SURFACES];
    };
}


#endif // SDL_H
